home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / Name.3 < prev    next >
Text File  |  1995-07-25  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____NNNNaaaammmmeeee((((3333))))                   TTTTkkkk (((( ))))                    TTTTkkkk____NNNNaaaammmmeeee((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_Name,  Tk_PathName,  Tk_NameToWindow  -  convert  between
  12.           names and window tokens
  13.  
  14.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  16.  
  17.           Tk_Uid
  18.           TTTTkkkk____NNNNaaaammmmeeee(_t_k_w_i_n)
  19.  
  20.           char *
  21.           TTTTkkkk____PPPPaaaatttthhhhNNNNaaaammmmeeee(_t_k_w_i_n)
  22.  
  23.           Tk_Window
  24.           TTTTkkkk____NNNNaaaammmmeeeeTTTTooooWWWWiiiinnnnddddoooowwww(_i_n_t_e_r_p, _p_a_t_h_N_a_m_e, _t_k_w_i_n)
  25.  
  26.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  27.           Tk_Window    _t_k_w_i_n       (in)      Token for window.
  28.  
  29.           Tcl_Interp   *_i_n_t_e_r_p     (out)     Interpreter  to  use  for
  30.                                              error reporting.
  31.  
  32.           char         *_p_a_t_h_N_a_m_e   (in)      Character          string
  33.                                              containing  path  name of
  34.                                              window.
  35.      _________________________________________________________________
  36.  
  37.  
  38.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  39.           Each window managed by Tk has two names, a short  name  that
  40.           identifies a window among children of the same parent, and a
  41.           path name that identifies the window uniquely among all  the
  42.           windows belonging to the same main window.  The path name is
  43.           used more often in Tk than the short name;   many  commands,
  44.           like bbbbiiiinnnndddd, expect path names as arguments.
  45.  
  46.           The TTTTkkkk____NNNNaaaammmmeeee macro returns a window's short  name,  which  is
  47.           the  same as the _n_a_m_e argument passed to TTTTkkkk____CCCCrrrreeeeaaaatttteeeeMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww
  48.           or TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTooooppppLLLLeeeevvvveeeellllWWWWiiiinnnnddddoooowwww or TTTTkkkk____CCCCrrrreeeeaaaatttteeeeCCCChhhhiiiillllddddWWWWiiiinnnnddddoooowwww when  the
  49.           window  was  created.   The  value  is returned as a Tk_Uid,
  50.           which may be used just like a string pointer  but  also  has
  51.           the  properties  of a unique identfier (see the manual entry
  52.           for TTTTkkkk____GGGGeeeettttUUUUiiiidddd for details).
  53.  
  54.           The TTTTkkkk____PPPPaaaatttthhhhNNNNaaaammmmeeee macro returns a hierarchical name for _t_k_w_i_n.
  55.           Path  names  have  a structure similar to file names in Unix
  56.           but with dots between elements instead of slashes:  the main
  57.           window   for   an   application   (one  created  by  calling
  58.           TTTTkkkk____CCCCrrrreeeeaaaatttteeeeMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww or  by  calling  TTTTkkkk____CCCCrrrreeeeaaaatttteeeeTTTTooooppppLLLLeeeevvvveeeellllWWWWiiiinnnnddddoooowwww
  59.           with  a  NULL _p_a_r_e_n_t argument) has the path name ``.'';  its
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____NNNNaaaammmmeeee((((3333))))                   TTTTkkkk (((( ))))                    TTTTkkkk____NNNNaaaammmmeeee((((3333))))
  71.  
  72.  
  73.  
  74.           children have names like ``.a'' and ``.b'';  their  children
  75.           have  names  like  ``.a.aa''  and  ``.b.bb'';  and so on.  A
  76.           window is considered to be be a child of another window  for
  77.           naming  purposes if the second window was named as the first
  78.           window's _p_a_r_e_n_t when the first window was created.  This  is
  79.           not always the same as the X window hierarchy.  For example,
  80.           a pop-up is created as a child of the root window,  but  its
  81.           logical   parent   will  usually  be  a  window  within  the
  82.           application.
  83.  
  84.           The procedure TTTTkkkk____NNNNaaaammmmeeeeTTTTooooWWWWiiiinnnnddddoooowwww returns the token for a window
  85.           given  its  path  name  (the  _p_a_t_h_N_a_m_e argument) and another
  86.           window belonging  to  the  same  main  window  (_t_k_w_i_n).   It
  87.           normally  returns  a  token  for the named window, but if no
  88.           such window exists TTTTkkkk____NNNNaaaammmmeeeeTTTTooooWWWWiiiinnnnddddoooowwww leaves an  error  message
  89.           in  _i_n_t_e_r_p->_r_e_s_u_l_t  and returns NULL.  The _t_k_w_i_n argument to
  90.           TTTTkkkk____NNNNaaaammmmeeeeTTTTooooWWWWiiiinnnnddddoooowwww is needed because path names are only unique
  91.           within  a  single application hierarchy.  If, for example, a
  92.           single process has opened two main windows, each will have a
  93.           separate  naming  hierarchy  and  the  same  path name might
  94.           appear in each of the hierarchies.  Normally  _t_k_w_i_n  is  the
  95.           main  window  of the desired hierarchy, but this need not be
  96.           the case:  any window in the desired hierarchy may be used.
  97.  
  98.  
  99.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  100.           name, path name, token, window
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.